import Vue from 'vue'
import App from './App.vue'
import router from "@/router/index"
//引入组件
import TypeNav from "@/components/index"
import Pagination from "@/components/Pagination"
//全局组件 第一个参数组件名字 
import store from "./store/index"
import "@/mock/mockServe"
import "swiper/css/swiper.css"
import *as API from "./api/"
import { Button, MessageBox,Message} from 'element-ui';
import VueLazyload from 'vue-lazyload'

Vue.use(VueLazyload,{
  loading:"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fgss2.bdstatic.com%2F9fo3dSag_xI4khGkpoWK1HF6hhy%2Fbaike%2Fs%3D220%2Fsign%3D1e50843576cb0a4681228c3b5b61f63e%2Fb3b7d0a20cf431add94c25f64636acaf2fdd9866.jpg&refer=http%3A%2F%2Fgss2.bdstatic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642592610&t=c3a957996bb722302d25fab72949a66c"
})
Vue.component(Button.name, Button);
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$message = Message;
Vue.prototype.$alert = MessageBox.alert;
Vue.component(Pagination.name,Pagination)
Vue.component(TypeNav.name,TypeNav)
Vue.config.productionTip = false
new Vue({
  render: h => h(App),
  beforeCreate(){
     Vue.prototype.$bus=this
     Vue.prototype.$API=API
  },
  router,
  store
}).$mount('#app')
